import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/home'
import Member from '@/views/Member'
import Newslist from '@/views/news/Newslist'
import Newsdetail from '@/views/news/Newsdetail'
import Imglist from '@/views/imgs/imgslist'
import Imgsdetail from '@/views/imgs/imgsdetail'
import Goodlist from '@/views/goods/goodslist'
import Goodsdetail from '@/views/goods/goodsdetail'
import Imgtxtinto from '@/views/goods/imgtxtinto'
import Goodscomment from '@/views/goods/goodscomment'
import Cart from '@/views/Cart'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      redirect: { name: 'home' }
    },
    {
      name: 'home',
      path: '/home',
      component: Home
    },
    {
      name: 'member',
      path: '/member',
      component: Member
    },
    {
      name: 'newslist',
      path: '/newslist',
      component: Newslist
    },
    {
      name: 'newsdetail',
      path: '/newsdetail/:id',
      component: Newsdetail
    },
    {
      name: 'imglist',
      path: '/img_list',
      component: Imglist
    },
    {
      name: 'imgsdetail',
      path: '/img_list/:id/detail',
      component: Imgsdetail
    },
    {
      name: 'goodslist',
      path: '/goods_list',
      component: Goodlist
    },
    {
      name: 'goodsdetail',
      path: '/goods_list/:id/goods_detail',
      component: Goodsdetail
    },
    {
      name: 'imgtxtinto',
      path: '/goods_list/:id/goods_detail/goods_desc',
      component: Imgtxtinto
    },
    {
      name: 'goodscomment',
      path: '/goods_list/:id/goods_detail/goods_comment',
      component: Goodscomment
    },
    {
      name: 'cart',
      path: '/cart',
      component: Cart
    }
  ]
})
